import Vue from "vue";
import Vuex from 'vuex'
import TodoHearder from'./modules/TodoHearder'
import TodoMain from'./modules/TodoMain'
import TodoFooter from'./modules/TodoFooter'
Vue.use(Vuex)
export default new Vuex.Store({
    modules: {
        TodoHearder,
        TodoMain,
        TodoFooter
    },
    getters: {
        getCotent: (state) => {
            return state.TodoHearder.textcontent
        },
        restCount(state) {
            return state.TodoHearder.textcontent.reduce((res,cur)=>cur.states?res:res+1,0)
         }
    }
})